<!--#INCLUDE FILE="config.asp"-->
<%

dim filename
filename = ""
Dim uploadObj
'Create an instance of our SmartUpload object.
Set uploadObj = Server.CreateObject("aspSmartUpload.SmartUpload")
uploadObj.AllowedFilesList = "pdf"
uploadObj.TotalMaxFileSize = 20000000
'Process the upload
on error resume next
uploadObj.Upload
'response.write "errnumber"&Err.number
if Err.number = -2147220494 then
	errmsg = "wtyp"
else
On Error GoTo 0
	errmsg = "upd"

For each file In uploadObj.Files

   '  Only if the file exist
   '  **********************
      If not file.IsMissing Then

      '  Add the current file in a DB field
      '  **********************************
        
          file.saveas server.MapPath("Pdf/"&file.filename)
          curfilename = server.MapPath("Pdf/"&file.filename)

		response.write file.filename
		  
      End If
Next
end if
	
%>